import request from '@/utils/request'
// 获取资源分类列表
export const getAllCategory = () => {
  return request({
    method: 'GET',
    url: '/boss/resource/category/getAll'
  })
}
// 分页查询资源分类
export const getResourcePages = data => {
  return request({
    method: 'POST',
    url: '/boss/resource/getResourcePages',
    data
  })
}
// 删除资源
export const deleteResource = id => {
  return request({
    method: 'POST',
    url: `/boss/resource/${id}`
  })
}
// 根据id查询资源
export const getResourceById = id => {
  return request({
    method: 'GET',
    url: `/boss/resource/${id}`
  })
}
// 新增或更新资源
export const addOrUpdateResource = data => {
  return request({
    method: 'POST',
    url: '/boss/resource/saveOrUpdate',
    data
  })
}
